import 'package:common/common.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:t_upgrade_plugin/module_registrar.dart';

import 'maker_app.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  AppFlavor.set(Flavor.Maker);

  ///可切换环境
  await Environment.initEnv(BuildType.Release);

  ///不可切换环境
  ModuleManager().register(UpgradeRegistrar());

  runApp(MultiBlocProvider(providers: [
    BlocProvider<LocaleBloc>(
      create: (_) => LocaleBloc(Locale('zh')),
    ),
  ], child: MakerApp()));
}
